package com.myapp.web.servlet.upload;

public class ProgressInfo {
	private long totalSize = 0;
	private long bytesRead = 0;
	private int fileIndex = 0;
	private long startTime = System.currentTimeMillis();
	
	private String uploadedFiles = "";
	private boolean isInProgress = true;
	private boolean isCompleted = false;

	private String curFileName = "";
	private String errorMsg = "";
	
	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	public String getCurFileName() {
		return curFileName;
	}

	public void setCurFileName(String curFileName) {
		this.curFileName = curFileName;
	}

	public String getUploadedFiles() {
		return uploadedFiles;
	}

	public void setUploadedFiles(String uploadedFiles) {
		this.uploadedFiles = uploadedFiles;
	}

	public long getStartTime() {
		return startTime;
	}

	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}

	public ProgressInfo() {
	}

	public long getTotalSize() {
		return totalSize;
	}

	public void setTotalSize(long totalSize) {
		this.totalSize = totalSize;
	}

	public long getBytesRead() {
		return bytesRead;
	}

	public void setBytesRead(long bytesRead) {
		this.bytesRead = bytesRead;
	}

	public long getDeltaTime() {
		return System.currentTimeMillis() - this.startTime;
	}

	public boolean isInProgress() {
		return isInProgress;
	}

	public int getFileIndex() {
		return fileIndex;
	}

	public void setFileIndex(int fileIndex) {
		this.fileIndex = fileIndex;
	}

	public boolean isCompleted() {
		return isCompleted;
	}

	public void setCompleted(boolean isCompleted) {
		this.isCompleted = isCompleted;
		this.isInProgress = false;

	}

	public void setInProgress(boolean isInProgress) {
		this.isInProgress = isInProgress;
	}
}
